<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>dinic: Referencia del Archivo dinic.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="annotated.html"><span>Estructuras&nbsp;de&nbsp;Datos</span></a></li>
      <li class="current"><a href="files.html"><span>Archivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Buscar" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;archivos</span></a></li>
      <li><a href="globals.html"><span>Globales</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Referencia del Archivo dinic.c</h1><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="dinic_8c.html">dinic.h</a>&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;stddef.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="constants_8h_source.html">constants.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="plist_8h_source.html">plist.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="node_8h_source.html">node.h</a>&quot;</code><br/>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Funciones</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dinic_8c.html#a7d14184334c90a95080a3c7d6c182571">print_aux</a> (FILE *f, <a class="el" href="structplist__s.html">plist_t</a> path, bool first_time, bool last_time, int step_number, unsigned int total_flow, unsigned int min_flow)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imprime los caminos bloqueantes en el archivo f.  <a href="#a7d14184334c90a95080a3c7d6c182571"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dinic_8c.html#a3b0565d681257e59b3dbd3918b3aac7f">blocking_step</a> (<a class="el" href="structs__network.html">network</a> n, <a class="el" href="structs__network.html">network</a> network_helper, bool get_aux, int step_number)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Paso bloqueante del algoritmo de dinic.  <a href="#a3b0565d681257e59b3dbd3918b3aac7f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dinic_8c.html#a9b5a340795d85f7e0148daf9795c8967">delete_edge</a> (<a class="el" href="structs__network.html">network</a> nh, unsigned int from, unsigned int to)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Borra la arista fromto del network auxiliar nh.  <a href="#a9b5a340795d85f7e0148daf9795c8967"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dinic_8c.html#ace09c857c3635db36d6d710c48ca8a36">dinic</a> (<a class="el" href="structs__network.html">network</a> n, bool get_flow, bool get_cut, bool get_aux)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Algortimo de dinic.  <a href="#ace09c857c3635db36d6d710c48ca8a36"></a><br/></td></tr>
</table>
<hr/><h2>Documentación de las funciones</h2>
<a class="anchor" id="a3b0565d681257e59b3dbd3918b3aac7f"></a><!-- doxytag: member="dinic.c::blocking_step" ref="a3b0565d681257e59b3dbd3918b3aac7f" args="(network n, network network_helper, bool get_aux, int step_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void blocking_step </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>network_helper</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>get_aux</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>step_number</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Paso bloqueante del algoritmo de dinic. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd>
<dd>
<code> (network_helper != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network donde se aumentará el flujo. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nh</em>&nbsp;</td><td>El network auxiliar que trataremos de bloquear sus caminos. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>get_aux</em>&nbsp;</td><td>Indica si hay que imprimir los caminos del NA. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>step_number</em>&nbsp;</td><td>Indica cuantas veces se ejecutó el paso bloqueante. Se utiliza para poder imprimir los caminos correctamente. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9b5a340795d85f7e0148daf9795c8967"></a><!-- doxytag: member="dinic.c::delete_edge" ref="a9b5a340795d85f7e0148daf9795c8967" args="(network nh, unsigned int from, unsigned int to)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void delete_edge </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>nh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>to</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Borra la arista fromto del network auxiliar nh. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (nh != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>nh</em>&nbsp;</td><td>El network auxiliar donde se quiere borrar la arista. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from</em>&nbsp;</td><td>El origen de la arista a borrar. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>El destino de la arista a borrar. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ace09c857c3635db36d6d710c48ca8a36"></a><!-- doxytag: member="dinic.c::dinic" ref="ace09c857c3635db36d6d710c48ca8a36" args="(network n, bool get_flow, bool get_cut, bool get_aux)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dinic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>get_flow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>get_cut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>get_aux</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Algortimo de dinic. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network donde se correrá el algortimo. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>get_flow</em>&nbsp;</td><td>Indica si hay que imprimir el flujo. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>get_cut</em>&nbsp;</td><td>Indica si hay que imprimir el corte. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>get_aux</em>&nbsp;</td><td>Indica si hay que imprimir los caminos. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7d14184334c90a95080a3c7d6c182571"></a><!-- doxytag: member="dinic.c::print_aux" ref="a7d14184334c90a95080a3c7d6c182571" args="(FILE *f, plist_t path, bool first_time, bool last_time, int step_number, unsigned int total_flow, unsigned int min_flow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void print_aux </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structplist__s.html">plist_t</a>&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>first_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>last_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>step_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>total_flow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>min_flow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Imprime los caminos bloqueantes en el archivo f. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (f != NULL) </code> </dd>
<dd>
<code> (path != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>El camino bloqueante. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>first_time</em>&nbsp;</td><td>Se usa para indicar la primera ejecución. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>last_time</em>&nbsp;</td><td>Se usa para indicar a ultima ejecución. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>step_number</em>&nbsp;</td><td>El numero del network auxiliar </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>total_flow</em>&nbsp;</td><td>El flujo total de un network auxiliar </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min_flow</em>&nbsp;</td><td>El flujo de un camino bloqueante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Estructuras de Datos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Tipos definidos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Definiciones</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generado el Mon Jun 6 20:15:28 2011 para dinic por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
